#ifndef __STACK_HPP__
#define __STACK_HPP__

#include "deque.hpp"

namespace stl_self
{
    template <typename Type, typename Container = stl_self::deque<Type>>
    class stack
    {
    private:
        Container _container;

    public:
        void push(const Type &value) { _container.push_back(value); }
        void pop() { _container.pop_back(); }
        const Type &top() const { return _container.back(); }
        const Type &back() const { return _container.back(); }
        size_t size() const { return _container.size(); }
        bool empty() const { return _container.empty(); }

    }; // class stack
} // namespace stl_self
#endif // #ifndef __STACK_HPP__
